//
//  AppConst.h
//  industry
//
//  Created by xl on 2020/11/11.
//  Copyright © 2020 Haier. All rights reserved.
//

#ifndef AppConst_h
#define AppConst_h

/** 距离 **/
#define SCREEN_BOUNDS               [UIScreen mainScreen].bounds
#define SCREEN_SCALE                [[UIScreen mainScreen] scale]
#define SCREEN_SIZE                 [UIScreen mainScreen].bounds.size
#define SCREEN_WIDTH                [UIScreen mainScreen].bounds.size.width
#define SCREEN_HEIGHT               [UIScreen mainScreen].bounds.size.height
#define SYSTEM_VERSION              [[UIDevice currentDevice] systemVersion]
//根据iPhone6的屏幕大小缩放，适配当前屏幕
#define AutoScaleWidth(x)           ((SCREEN_WIDTH/375.00) * (x))
#define AutoScaleHeight(x)          ((SCREEN_HEIGHT/667.00) * (x))
//判断是否是iphonex Plus
#define KIsiPhonexPlus ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size) : NO)

//安全区域
#define SAFEAREAINSETS [XLHelperTool xl_safeAreaInsets]
//状态栏高度
#define STATUSBAR_HEIGHT (([UIWindow instancesRespondToSelector:@selector(safeAreaInsets)]) ? (SAFEAREAINSETS.top ?: 20) : 20)
//距离底部安全距离
#define SAFEAREA_BOTTOM_HEIGHT SAFEAREAINSETS.bottom
//导航栏高度
#define NAVIGATIONBAR_HEIGHT     (44 + STATUSBAR_HEIGHT)
//tabar高度
#define XL_TABBAR_HEIGHT         (49 + SAFEAREA_BOTTOM_HEIGHT)

//弹框提示显示时间
#define XLShowMessageDelayTime     2
//弹框loading显示时间
#define XLShowLoadingDelayTime     30

//颜色
#define COLOR_WITH_HEX(color)       [UIColor colorWithHex:(color) alpha:1.0]
//cell分割线默认灰色
#define COLOR_DEFAULT_SEPARATOR     COLOR_WITH_HEX(0xe5e5e5)

//请求列表数据条数
#define XLPageSize  20



#endif /* AppConst_h */
